<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<c:choose>
	<c:when test="${poezie.date == null }">
		<c:set var="data" scope="page" value="<%=new java.util.Date()%>"/>
	</c:when>
	<c:otherwise>
		<c:set var="data" scope="page" value="${poezie.date }"/>
	</c:otherwise>
</c:choose>
<center>
<table width="1200px" border=1 cellpadding="0" cellspacing="0">
	<tr>
		<td valign="top" width="200px">
		<!-- START RIGHT MENU PAGE -->
		<%@include file="rightMenu.jsp" %>
		<!-- END RIGHT MENU PAGE -->
		</td>
		<td valign="top" width="1000px">
		<!-- START CONTENT PAGE -->
			<form action="/EfrAdm/Op4PoezieSubmit.do" method="post">
			<table>
				<tr>
					<td>Titlu</td>
					<td><input type="hidden" name="id" value="${poezie.id }"><input type="text" name="titlu" value="${poezie.titlu }"></td>
				</tr>
				<tr>
					<td>Autor</td>
					<td>
						<select name="autor">
						<c:forEach var="autor" items="${listAutors }">
							<option <c:if test="${poezie.autor.id == autor.id }">selected</c:if> value="${autor.id }">${autor.numeAutor }</option>				
						</c:forEach>
						</select>
					</td>
				</tr>	
				<tr>
					<td>Versuri</td>
					<td><textarea rows="8" cols="20" name="versuri">${poezie.versuri }</textarea></td>
				</tr>
				<tr>
					<td>Data</td>
					<td><input type="text" name="date" value="<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss.S" value="${data}" />"></td>
			
				</tr>
				<tr>
					<td>Poezie default</td>
					<td><input type="text" name="poezieDefault" value="${poezie.poezieDefault }"></td>
				</tr>
				<tr>
					<td>Nume File</td>
					<td><input type="text" name="numeFile" value="${poezie.numeFile }"></td>
				</tr>
				<tr>
					<td>idYtb</td>
					<td><input type="text" name="idYtb" value="${poezie.idYtb }"></td>
				</tr>
				<tr>
					<td colspan="2" align="center"><input type="submit" value="${action }" name="action"></td>
				</tr>
			</table>
			</form>
		<!-- END CONTENT PAGE -->
		</td>
	</tr>
</table>
</center>
</body>
</html>